#
# Copyright (c) 2018, NXP
#
# SPDX-License-Identifier: Apache-2.0
#

zephyr_include_directories(.)

zephyr_compile_definitions_ifdef(
  CONFIG_PTP_CLOCK_MCUX
  ENET_ENHANCEDBUFFERDESCRIPTOR_MODE
)

zephyr_sources_ifdef(CONFIG_HAS_MCUX_CACHE     fsl_cache.c)
zephyr_sources_ifdef(CONFIG_ADC_MCUX_ADC12     fsl_adc12.c)
zephyr_sources_ifdef(CONFIG_ADC_MCUX_ADC16     fsl_adc16.c)
zephyr_sources_ifdef(CONFIG_ETH_MCUX           fsl_enet.c)
zephyr_sources_ifdef(CONFIG_I2C_MCUX           fsl_i2c.c)
zephyr_sources_ifdef(CONFIG_I2C_MCUX_LPI2C     fsl_lpi2c.c)
zephyr_sources_ifdef(CONFIG_PWM_MCUX_FTM       fsl_ftm.c)
zephyr_sources_ifdef(CONFIG_ENTROPY_MCUX_RNGA  fsl_rnga.c)
zephyr_sources_ifdef(CONFIG_ENTROPY_MCUX_TRNG  fsl_trng.c)
zephyr_sources_ifdef(CONFIG_SOC_FLASH_MCUX     fsl_ftfx_flash.c fsl_ftfx_controller.c)
zephyr_sources_ifdef(CONFIG_SPI_MCUX_DSPI      fsl_dspi.c)
zephyr_sources_ifdef(CONFIG_SPI_MCUX_LPSPI     fsl_lpspi.c)
zephyr_sources_ifdef(CONFIG_UART_MCUX          fsl_uart.c)
zephyr_sources_ifdef(CONFIG_UART_MCUX_LPSCI    fsl_lpsci.c)
zephyr_sources_ifdef(CONFIG_UART_MCUX_LPUART   fsl_lpuart.c)
zephyr_sources_ifdef(CONFIG_COUNTER_MCUX_RTC   fsl_rtc.c)
zephyr_sources_ifdef(CONFIG_RTC_MCUX           fsl_rtc.c)
zephyr_sources_ifdef(CONFIG_WDT_MCUX_WDOG      fsl_wdog.c)
zephyr_sources_ifdef(CONFIG_WDT_MCUX_WDOG32    fsl_wdog32.c)
zephyr_sources_ifdef(CONFIG_CAN_MCUX_FLEXCAN   fsl_flexcan.c)
zephyr_sources_ifdef(CONFIG_HAS_MCUX_SMC       fsl_smc.c)
zephyr_sources_ifdef(CONFIG_COUNTER_MCUX_LPTMR fsl_lptmr.c)

if(NOT CONFIG_ASSERT OR CONFIG_FORCE_NO_ASSERT)
  zephyr_compile_definitions(NDEBUG) # squelch fsl_flexcan.c warning
endif()
